package com.haikesi.api.excutionplan.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
public class ExcutionPlanProcessSearchVO implements Serializable {

    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "执行计划id")
    private String excutionPlanId;

    @ApiModelProperty(value = "进程名称")
    private String name;

    @ApiModelProperty(value = "页数")
    private Integer pageNumber;

    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if (pageNumber == null) {
            pageNumber = 1;
        }
        return pageNumber;
    }

    public Integer getPageSize() {
        if (pageSize == null) {
            pageSize = 20;
        }
        if (pageSize > 100) {
            pageSize = 100;
        }
        return pageSize;
    }
}
